<page-bar></page-bar>
<div class="d-flex justify-content-between align-items-center mb-sm">
  <div class="d-flex align-items-center">
    <input nz-input [(ngModel)]="params.type" placeholder="根据字典key搜索" />
    <button nz-button nzType="primary" (click)="st.load(1, params)" class="ml-md">搜索</button>
    <button nz-button nzType="default" (click)="reset()">重置</button>
    <button *ngIf="auth_btn_add" (click)="add()" nz-button nzType="default" class="ml-md" type='button'>新增字典</button>
  </div>
  <div>
    <!-- <custom-column [st]="st" (ok)="st.resetColumns()"></custom-column> -->
  </div>
</div>

<st #st [pi]='pi' [widthMode]="{ type: 'strict' }" [data]="url" [page]="{showSize: true}" [size]="'small'"
  [columns]="columns" [req]="{params: params, reName: { pi: 'current', ps: 'size' }}"
  [res]="{reName: { total: 'data.total', list: 'data.records'}}">
  <ng-template st-row="type" let-item let-index="index">
    <a routerLink="/system/dict/detail/{{ item.id }}" [state]="{ pi: st.pi }">{{ item.type }}</a>
  </ng-template>
</st>
